Skip to content

fix: resolve syntax error in public routes#266

Open
aditya-narayan007 wants to merge 2 commits into
Dev-Card:mainfrom
aditya-narayan007:fix-public-routes-syntax-error
Open

fix: resolve syntax error in public routes#266
aditya-narayan007 wants to merge 2 commits into
Dev-Card:mainfrom
aditya-narayan007:fix-public-routes-syntax-error

Conversation

@aditya-narayan007
Copy link
Copy Markdown

Description

Fixes #265

This PR fixes the backend startup failure caused by syntax/parsing errors in apps/backend/src/routes/public.ts.

Changes Made

  • Removed duplicated nested app.get() route definitions

  • Fixed route handler structure for:

    • /:username
    • /:username/card/:cardId
  • Restored proper Fastify route syntax and balanced closing brackets/parentheses

Verification

Verified backend TypeScript compilation using:

pnpm --filter @devcard/backend exec tsc --noEmit

Confirmed the backend no longer crashes due to:

ERROR: Expected ")" but found end of file

Issue

Fixes the backend startup parsing error in public.ts.

@Harxhit Harxhit added the gssoc:approved Required label for every approved PR. Gives the base +50 points and enables contribution tracking. label May 23, 2026
@ShantKhatri ShantKhatri requested a review from Harxhit May 23, 2026 16:34
@Harxhit
Copy link
Copy Markdown
Collaborator

Harxhit commented May 23, 2026

Please fix the merge conflicts.

@Harxhit
Copy link
Copy Markdown
Collaborator

Harxhit commented May 23, 2026

Fix the merge conflicts please and pin me.

@aditya-narayan007
Copy link
Copy Markdown
Author

Fixed the merge conflicts. @Harxhit Please review.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please explain what changes did made in this file? All I see removed spacing.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main fix was actually the incorrect nested app.get() route definitions inside public.ts, which was causing the syntax/TypeScript issue.
I removed the duplicated nested routes for /:username and /:username/card/:cardId and restored the proper Fastify route structure.
The spacing/indentation changes are just a side effect of restructuring the block.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc:approved Required label for every approved PR. Gives the base +50 points and enables contribution tracking.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Backend fails to start due to syntax error in public.ts

2 participants